package com.bicon.botu.mall.order.controller;

import com.bicon.botu.core.base.common.controller.BaseController;
import com.bicon.botu.core.base.common.entity.BaseResult;
import com.bicon.botu.mall.order.dto.OrderReceiptDTO;
import com.bicon.botu.mall.order.service.IOrderReceiptService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 李双喜
 * @since 2018-05-14
 */
@RestController
@RequestMapping("/V3.0.0/order-receipt")
public class OrderReceiptControllerV3 extends BaseController {

    @Autowired
    private IOrderReceiptService iOrderReceiptService;
    /**
     * 获取收款信息列表
     * @param orderGoodsId
     * @return
     */
    @RequestMapping(value = "getOrderReceiptInfoList",method = RequestMethod.POST)
    public BaseResult getOrderReceiptInfoList(String orderGoodsId){
        if(StringUtils.isNotBlank(orderGoodsId)){
            List<OrderReceiptDTO> receiptDTOList=iOrderReceiptService.getOrderReceiptInfoList(orderGoodsId);
            return sendResult200(receiptDTOList);
        }else{
            return sendResult400();
        }
    }
	
}
